home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 4 / Amoszine 4 (Disk 2 of 3).adf / Intuition_Procs / intui.lha / Demo_2.Amos / Demo_2.amosSourceCode
AMOS Source Code  |  1992-02-26  |  2KB  |  87 lines

  1. ' Demo of OpenScreen, CloseScreen, SetAPen, Rectfill 
  2. ' note that during the demo the drag bar and back/front gadgets may be used
  3. '
  4. Amos To Back 
  5. '
  6. Wait 50
  7. '
  8. _OPENSCREEN[0,0,320,200,5,0,1,2,15,0,0,0,"          AMOS And Intuition "]
  9. '
  10. For N=1 To 200
  11.    '
  12.    X=Rnd(320-25) : Y=Rnd(200-40)
  13.    '
  14.    _SETAPEN[_IS,Rnd(31)]
  15.    _RECTFILL[_IS,X,Y+15,X+25,Y+40]
  16.    '
  17. Next 
  18. '
  19. Wait 100
  20. '
  21. _CLOSESCREEN[_IS]
  22. '
  23. Wait 50
  24. '
  25. Amos To Front 
  26. '
  27. Edit 
  28. '
  29. Procedure _OPENSCREEN[X,Y,W,H,D,F,B,V,S,C,G,M,T$]
  30.    
  31.    Global _IS
  32.    
  33.    T$=T$+Chr$(0)
  34.    
  35.    Reserve As Work 10,32
  36.    
  37.    A=Start(10)
  38.    
  39.    Doke A,X : Add A,2 : Rem                             -- x_pos:  
  40.    Doke A,Y : Add A,2 : Rem                             -- y_pos:  
  41.    Doke A,W : Add A,2 : Rem                             -- width:  
  42.    Doke A,H : Add A,2 : Rem                             -- height: 
  43.    Doke A,D : Add A,2 : Rem                             -- depth:  
  44.    Poke A,F : Add A,1 : Rem                             -- detail_pen: 
  45.    Poke A,B : Add A,1 : Rem                             -- block_pen:  
  46.    Doke A,V : Add A,2 : Rem                             -- view_modes: 
  47.    Doke A,S : Add A,2 : Rem                             -- screen_type:  
  48.    Loke A,C : Add A,4 : Rem                             -- font: 
  49.    Loke A,Varptr(T$) : Add A,4 : Rem                    -- title:   
  50.    Loke A,G : Add A,4 : Rem                             -- gadgets:  
  51.    Loke A,M : Rem                                       -- bitmap:     
  52.    
  53.    Areg(0)=Start(10)
  54.    
  55.    _IS=Intcall(-198)
  56.    
  57.    Erase 10
  58.    
  59. End Proc
  60. Procedure _CLOSESCREEN[_IS]
  61.    
  62.    Areg(0)=_IS : Rem     -- Screen Handle In A0 
  63.    
  64.    NULL=Intcall(-66)
  65.    
  66. End Proc
  67. Procedure _RECTFILL[_IS,A,B,C,D]
  68.    
  69.    Areg(1)=_IS+84
  70.    
  71.    Dreg(0)=A
  72.    Dreg(1)=B
  73.    Dreg(2)=C
  74.    Dreg(3)=D
  75.    
  76.    T=Gfxcall(-306)
  77.    
  78. End Proc
  79. Procedure _SETAPEN[_IS,C]
  80.    
  81.    Areg(1)=_IS+84
  82.    
  83.    Dreg(0)=C
  84.    
  85.    P=Gfxcall(-342)
  86.    
  87. End Proc